


<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户登陆</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
  </head>
  <body>

  <div class="container">
    <div class="row">
        <div class="col">
        </div>
        <div class="col">
                <h1>用户登录</h1>
                {% if message %}
                <div class="alert alert-warning" role="alert">
                警告：<a href="#" class="alert-link">{{ message }}</a>
                </div>
                {% endif %}
        </div>
        <div class="col">
        </div>
    <div class="row">
        <div class="col">
        </div>
        <div class="col">
                <form class="row g-3" action="/login/" method="post">
                    {% csrf_token %}
                  <div class="col-auto">
                    <label for="inputPassword2" class="visually-hidden">{{ login_form.username.label }}</label>
                    <input type="text" class="form-control" id="inputPassword2" placeholder="用户名" name="username">
                  </div>
                  <div class="col-auto">
                    <label for="inputPassword2" class="visually-hidden">{{ login_form.password.label }}</label>
                    <input type="password" class="form-control" id="inputPassword2" placeholder="密码必须是数字和符号组成" name="password">
                  </div>
                   <div class="col-auto">
                       <label>{{ login_form.captcha.label }}</label>
                        {{ login_form.captcha }}
                  </div>
                  <div class="col-auto">
                    <a href="/register/" button type="submit" class="btn btn-primary mb-3">新用户注册</a>
                    <button type="submit" class="btn btn-primary mb-3">登录</button>
                  </div>
                </form>
        </div>
        <div class="col">
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
  </body>
</html>